package com.ruoyi.admin.service.impl;

import com.ruoyi.admin.service.StatisticsService;
import com.ruoyi.app.mapper.OrderInfoMapper;
import com.ruoyi.app.mapper.UserVisitMapper;
import com.ruoyi.app.mapper.VisitMapper;
import com.ruoyi.framework.web.domain.AjaxResult;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Map;

/*
@description:
@ClassName StatisticsServiceImpl
@author chen
@create 2025-04-08 0:06
@Version 1.0
*/
@Slf4j
@Service
@AllArgsConstructor
public class StatisticsServiceImpl implements StatisticsService
{
    final OrderInfoMapper orderInfoMapper;
    final UserVisitMapper userVisitMapper;
    final VisitMapper visitMapper;

    @Override
    public AjaxResult getPayedOrder(Map<String, Object> params)
    {
        Map<String,Object> map = orderInfoMapper.getPayedOrder(params);
        return AjaxResult.success(map);
    }

    @Override
    public AjaxResult getVisit(Map<String, Object> params)
    {
        Map<String,Object> map =  visitMapper.getVisit(params);
        return AjaxResult.success(map);
    }

    @Override
    public AjaxResult getUserVisit(Map<String, Object> params)
    {
        Map<String,Object> map =   userVisitMapper.getUserVisit(params);
        return AjaxResult.success(map);
    }
}
